package com.ethan.orika;

import com.ethan.model.Address;
import com.ethan.model.Person;
import com.ethan.model.PersonDto;
import ma.glasnost.orika.MapperFactory;
import ma.glasnost.orika.impl.DefaultMapperFactory;

/**
 * @author ethan
 * create 2018-04-11 下午2:50
 * desc 浅拷贝or深拷贝
 **/
public class OrikaTest5 {
    public static void main(String[] args){
        MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
        Person person = new Person();
        Address address = new Address();
        person.setAddress(address);
        PersonDto personDto = mapperFactory.getMapperFacade().map(person, PersonDto.class);
        System.out.println(personDto.getAddress().hashCode() == person.getAddress().hashCode());
        String a="";
    }
}
